precision mediump float;
uniform vec4 color;
uniform vec4 fadeColor;
uniform vec4 backgroundColor;
uniform int fAlive;
varying float intensity;
void main() {
    if (fAlive > 0) {
        gl_FragColor = mix(fadeColor, color, intensity);
    } else {
        gl_FragColor = mix(color, backgroundColor, intensity);
    }
}